package com.javajun.entity;

import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.OneToOne;

import org.hibernate.annotations.NotFound;
import org.hibernate.annotations.NotFoundAction;

import com.fasterxml.jackson.annotation.JsonIgnore;

/**
 * @className: EnterpriseAdmin
 * @description: 租户管理员，继承自SysUser
 * @author: JavaJun
 * @date: 2018年10月29日
 */
@Entity
public class EnterpriseAdmin extends SysUser{

    // 租户管理员邮箱
    private String email;
    // 租户管理员电话
    private String tel;
    // 租户,@OneToOne
    @JsonIgnore
    private Enterprise enterprise;
    
    @OneToOne
    @NotFound(action=NotFoundAction.IGNORE)
    public Enterprise getEnterprise() {
        return enterprise;
    }
    public void setEnterprise(Enterprise enterprise) {
        this.enterprise = enterprise;
    }
    public String getEmail() {
        return email;
    }
    public void setEmail(String email) {
        this.email = email;
    }
    public String getTel() {
        return tel;
    }
    public void setTel(String tel) {
        this.tel = tel;
    }
    
}
